package de.jreg.api;

import java.util.Arrays;

/*---------------------------------------------------------------------------*/
/**
 * @author xhu2023
 *
 */
public class BinaryRegistryValue implements IRegistryValue
{
    private byte[] value;

    /*-----------------------------------------------------------------------*/
    /**
     * @param value
     */
    public BinaryRegistryValue(byte[] value)
    {
        this.value = Arrays.copyOf(value, value.length);
    }

    /*-----------------------------------------------------------------------*/
    /**
     * @return
     */
    public final byte[] getValue()
    {
        return this.value;
    };
    
    /*-----------------------------------------------------------------------*/
    /* (non-Javadoc)
     * @see de.jreg.api.AbstractRegistryValue#getType()
     */
    @Override
    public Type getType()
    {
        return IRegistryValue.Type.REG_BINARY;
    }
    
    /*-----------------------------------------------------------------------*/
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    public String toString() {
        
        return Arrays.toString(this.value);
    }
    
}

